<!-- 配额管理 -->
<template>
	<uv-navbar :fixed="true" :placeholder="true" :title="title" left-arrow @leftClick="$onClickLeft" />
	<view class="container">

		<uv-tabs :list="list" :current="current" :scrollable="false" lineWidth="60" @click="handleTab"></uv-tabs>
		<template v-if="current == '0'">
			<overView :list="overviewList" title="交易概况" />

		</template>
		<template v-else-if="current == '1'">

			<transactionSiuation />
		</template>
		<template v-else-if="current == '2'">
			<record />
		</template>

	</view>


</template>

<script setup>
	import {
		ref
	} from "vue"

	import overView from "@/pages/components/module/overview/overview"
	import transactionSiuation from "./components/transactionSituation.vue"
	import record from "./components/record"
	const title = ref('交易情况')
	const current = ref(0)
	const list = ref([{
			name: '交易统计',
		},
		{
			name: '交易情况',
		},
		{
			name: '交易记录',
		},
	])
	const overviewList = ref([{
		value: '5689',
		title: '碳资产总额(万吨CO₂)'
	}, {
		value: '47.86',
		title: '平均卖出单价(元/吨)'
	}, {
		value: '30.89',
		title: '平均买入单价(元/吨)'
	}, ])

	const handleTab = (e) => {
		console.log("点击", e)
		current.value = e.index
	}
</script>

<style lang="scss" scoped>
</style>